<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="../../commons/taglibs.jsp"%>
<%@ include file="../../commons/list.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta charset="utf-8">
  <title>汽车安全装备详情</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <style type="text/css">
  	.layui-input{
  		width: 400px;
  	}
  	.layui-form-pane .layui-form-label{
  		width: 200px;
  	}
  </style>
</head>
 
<body>
<div>
	<div style="padding: 100px;padding-top: 10px">
		<form class="layui-form layui-form-pane"  action="">
			<input type="hidden" id='entityId' name='entityId' value="${carDetailOutConfig.id }">
			<input type="hidden" name='carmodelid' value="${carmodelid }">
			
	   		 <div class="layui-form-item">
			     <label class="layui-form-label">电动天窗</label>
			     <div class="layui-input-inline">
			         <input type="text" name="electricskylight" id='electricskylight' placeholder="请输入电动天窗" value="${carDetailOutConfig.electricskylight }" class="layui-input">
			     </div>
			 </div>
			 
			 <div class="layui-form-item">
			     <label class="layui-form-label">全景天窗</label>
			     <div class="layui-input-inline">
			         <input type="text" name="panoramicsunroof" id='panoramicsunroof' placeholder="请输入全景天窗" value="${carDetailOutConfig.panoramicsunroof }" class="layui-input">
			     </div>
			 </div>
			 
			 <div class="layui-form-item">
			     <label class="layui-form-label">运动外观套件</label>
			     <div class="layui-input-inline">
			         <input type="text" name="appearancepackage" id='appearancepackage' placeholder="请输入运动外观套件" value="${carDetailOutConfig.appearancepackage }" class="layui-input">
			     </div>
			 </div>
			 
			  <div class="layui-form-item">
			     <label class="layui-form-label">运动外观套件</label>
			     <div class="layui-input-inline">
			         <input type="text" name="appearancepackage" id='appearancepackage' placeholder="请输入运动外观套件" value="${carDetailOutConfig.appearancepackage }" class="layui-input">
			     </div>
			 </div>
			 
			 <div class="layui-form-item">
			     <label class="layui-form-label">电动吸合门</label>
			     <div class="layui-input-inline">
			         <input type="text" name="electricsuctiondoor" id='electricsuctiondoor' placeholder="请输入运动外观套件" value="${carDetailOutConfig.electricsuctiondoor }" class="layui-input">
			     </div>
			 </div>
			 
			 <div class="layui-form-item">
			     <label class="layui-form-label">侧滑门</label>
			     <div class="layui-input-inline">
			         <input type="text" name="slidedoor" id='slidedoor' placeholder="请输入侧滑门" value="${carDetailOutConfig.slidedoor }" class="layui-input">
			     </div>
			 </div>
			 
			 <div class="layui-form-item">
	   		 
			     <label class="layui-form-label">电动后备厢</label>
			     <div class="layui-input-inline">
			         <input type="text" name="electrictrunk" id='electrictrunk' placeholder="请输入电动后备厢" value="${carDetailOutConfig.electrictrunk }" class="layui-input">
			     </div>
			     
			 </div>
			 
			 <div class="layui-form-item" style="width: 85%;padding-left: 200px;padding-top: 30px">
			    <div class="layui-input-block">
			      <button class="layui-btn" id='tjsub' lay-submit lay-filter="formDemo">立即提交</button>
		    	</div>
		  	</div>
		</form>
	</div>
 </div>
<script>

layui.use(['form'], function () {
    var $ = layui.jquery
        ,form = layui.form
        ,layer= layui.layer;
    
     var form = layui.form;
	  
	  //监听提交
	  form.on('submit(formDemo)', function(data){
		  var field = JSON.parse(JSON.stringify(data.field));
		  var img = field.img;
		  field.img = $("#imgAddress").val();
	  	//提交成功后禁用按钮
		$("#tjsub").css("pointer-events","none"); 
	    //layer.msg(JSON.stringify(data.field));
	    $.post("<%=basePath%>/controller/carDetailOutConfig/save",field,function (data){
	    	if(data == '0'){
	    		$("#tjsub").css("pointer-events","auto");
	    		layer.msg('提交成功', {time:1000}); 
	    		setTimeout("window.location.reload();",1500); 
	    	}else{
	    		$("#tjsub").css("pointer-events","auto");
	    		layer.msg('提交失败', {time:1000}); 
	    	}
	    })
	    return false;
	  });
    
});

</script>
</body>
</html>
